home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / menus / envmnu11.zip / CDMENU.BAT < prev    next >
DOS Batch File  |  1992-11-16  |  775b  |  36 lines

  1. @echo off
  2. REM EXAMPLE THAT WORKS FOR DOS 5 (I think) TO CHANGE DIRECTORIES
  3.  
  4. :Again
  5. if exist DirList.Tmp del DirList.Tmp
  6. if a%CMDLINE%z==az GOTO BEYOND_4DOS_DOTS
  7. echo .. >> DirList.Tmp
  8. echo . >> DirList.Tmp
  9. :BEYOND_4DOS_DOTS
  10. dir /Ad /b >> DirList.Tmp
  11. REM 4-DOS method for getting dots
  12. :GOT_DOTS
  13. echo C: >> DirList.Tmp
  14. echo D: >> DirList.Tmp
  15. echo E: >> DirList.Tmp
  16. set DIR_CHOICE=
  17. envimenu DIR_CHOICE DirList.Tmp /Prompt "Choose a directory, or Esc to quit:" /Esc
  18. if ERRORLEVEL 1 GOTO FINISHED
  19. del DirList.Tmp > NUL
  20. if %DIR_CHOICE%==C: GOTO CDRIVE
  21. if %DIR_CHOICE%==D: GOTO CDRIVE
  22. if %DIR_CHOICE%==E: GOTO CDRIVE
  23. cd %DIR_CHOICE%
  24. GOTO Again
  25.  
  26. :CDRIVE
  27. %DIR_CHOICE%
  28. GOTO Again
  29.  
  30.  
  31. :FINISHED
  32. if exist DirList.Tmp del DirList.Tmp
  33. set DIR_CHOICE=
  34. cls
  35.  
  36.